package com.ebraga.trackerclub.android.util;

public class ISmartServiceConstants {

	public static interface VERSION_INFO {
		
		public static final String VERSION_APP			= "1.1";
		public static final String PROJECT_ID			= "2";
		
	}

	public static interface ERROR_CODE {
		
		//Ocorreu um erro, tente novamente.
		public static final String GENERIC_ERROR			= "error_generic";
		
		//Preencha o campo usuário.
		public static final String USER_REQUIRED			= "error_user_required";
		
		//Preencha o campo senha.
		public static final String PWD_REQUIRED				= "error_pwd_required";
		
		//Usuário ou senha inválida.
		public static final String INVALID_LOGIN			= "error_invalid_login";
		
		//ispositivo não registrado. Por favor, entre em contato com a filial.
		public static final String INVALID_IMEI				= "error_invalid_imei";
		
		//Aguardando posição GPS.
		public static final String WAIT_GPS_POSITION		= "error_wait_gps_position";
		
		//Aguardando carro parado.
		public static final String WAIT_STOPPED_CAR			= "error_wait_stopped_car";		
		
		//O período permitido para login offline expirou, você precisa de uma conexão internet.
		public static final String LOGIN_OFFLINE_EXPIRE 	= "error_login_offline_expire";
		
		//O período permitido para login automático expirou.
		public static final String LOGIN_OFFLINE_AUTO 	= "error_login_offline_auto";		
		
		//Problemas para conectar ao serviço.
		public static final String OFF_LINE_CONNECTION 		= "error_off_line_connection";

		//Usuário ou senha inválida. Tente novamente com uma conexão de internet.
		public static final String INVALID_LOGIN_OFF_LINE 	= "error_invalid_login_off";
		
		//Argumentos inválidos.
		public static final String INVALID_ARGUMENT 		= "error_invalid_argument";
		
		//Nome inválida.
		public static final String INVALID_NAME			= "error_invalid_name";		
		
		//Marca inválida.
		public static final String INVALID_BRAND			= "error_invalid_brand";
		
		//Modelo inválida.
		public static final String INVALID_MODEL			= "error_invalid_model";		

		
	}	
	
	public static interface WARN_CODE {
		
		//Sem conexão com a internet.
		public static final String WARN_INTERNET_OFF	= "warn_internet_off";
		
		//Conexão internet ativa 
		public static final String WARN_INTERNET_ON		= "warn_internet_on";
		
		//Popup de aguarde
		public static final String WARN_WAITTING		= "warn_waitting";

		//Popup de aguarde
		public static final String WARN_INPROCESS		= "warn_inprocess";
		
		
	}		
	

	public static interface TYPE_CHECK_IN_OUT {
		
		public static final String IN			= "IN";
		public static final String OUT			= "OUT";
		public static final String DISABLED		= "DISABLED";		

		
	}		
	
	public static interface REQUEST_METHOD {
		
		public static final String GET			= "GET";
		public static final String POST			= "POST";
		public static final String PUT			= "PUT";
		public static final String DELETE		= "DELETE";	
		
	
		
	}
	
	public static interface WEBSERVICE_URL {

//		String base = "http://192.168.0.8:8080/tracker-service/";
		String base = "http://sswbr.com/tracker-service/";
		/**
		 * URL used to put user.
		 */
		public static final String INSERT_USER_URL = base + "rest/users/insertupdateuser";		
		/**
		 * URL used to put positions.
		 */
		public static final String INSERT_POSITIONS_URL = base +  "rest/position/saveposition";
		/**
		 * URL used to list positions.
		 */
		public static final String LIST_POSITIONS_URL = base + "rest/position/allpositions";		
		/**
		 * URL used to get Parameters.
		 */
		public static final String RETRIEVE_PARAMETERS_URL = base + "rest/parameter/allparameters";
		
		/**
		 * URL used to get Ranking.
		 */
		public static final String RETRIEVE_RANKING_URL = base + "rest/ranking/allranking";		
		
	}
	
	public static interface WEBSERVICE_CERTIFICATE {
		
		public final String KEY_STORE_PASSWORD = "Sicpa123";
		public final String JKS_PASSWORD = "bcksicpa";
	}	
	
	public static interface NOTIFICATION_ID {
		
		public final Integer RANKING_CHANGED = 100;
		public final Integer GPS_DISABLED = 200;
		
	}	
	

	public static interface SCREEN_TAG {
		
		public static final String CHECKINOUT			= "CHECKINOUT";
		public static final String RANKING				= "RANKING";
		public static final String CHRONOMETER			= "CHRONOMETER";
		public static final String CHECKINOUT_HISTORY	= "CHECKINOUT_HISTORY";
		
	}	
	
	public static interface DATABASE {
		
		public static interface CHECKINOUT {
			public static final String FIELD_ID	 		= "xidCheckInOut";
			public static final String FIELD_LOGIN 		= "login";
			public static final String FIELD_TYPE 		= "type";
			public static final String FIELD_POSITION_ID= "idPosition";
			public static final String FIELD_SYNC_DATE	= "sinchronized";
			public static final String FIELD_CREATE_DATE= "dateCreated";
			
			public static final String TABLE_NAME = "checkInOut";
		}
		
		public static interface POSITION {
			public static final String FIELD_ID			= "xidPosition";
			public static final String FIELD_IMEI		= "imei";
			public static final String FIELD_LATITUDE	= "latitude";
			public static final String FIELD_LONGITUDE  = "longitude";	
			public static final String FIELD_ACCURACY   = "accuracy";
			public static final String FIELD_PROVIDER   = "provider";
			public static final String FIELD_SYNC_DATE	= "sinchronized";
			public static final String FIELD_CREATE_DATE= "dateCreated";
			public static final String FIELD_SPEED= "speed";
			
			public static final String TABLE_NAME = "position";
		}
		
		public static interface CHRONOMETER {
			
			public static final String FIELD_ID = "xidChronometer";
			public static final String FIELD_IMEI = "imei";
			public static final String FIELD_NAME = "name";
			public static final String FIELD_BRAND = "brand";
			public static final String FIELD_MODEL = "model";
			public static final String FIELD_TYPE = "typeChronometer";
			public static final String FIELD_TIME = "time";
			public static final String FIELD_START_LAT = "startLatitude";
			public static final String FIELD_START_LOG = "startLongitude";
			public static final String FIELD_START_SPEED = "startSpeed";
			public static final String FIELD_START_DATE = "startDate";
			public static final String FIELD_END_LAT = "endLatitude";
			public static final String FIELD_END_LOG = "endLongitude";
			public static final String FIELD_END_SPEED = "endSpeed";
			public static final String FIELD_END_DATE = "endDate";
			public static final String FIELD_CREATED_DATE = "dateCreated";
			public static final String FIELD_SYNC_DATE = "sinchronized";
			
			public static final String TABLE_NAME = "chronometer";
		}		
		
		public static interface RANKING {
			public static final String FIELD_ID			= "xidRanking";
			public static final String FIELD_NAME		= "name";
			public static final String FIELD_BRAND   	= "brand";
			public static final String FIELD_MODEL		= "model";			
			public static final String FIELD_LATITUDE	= "latitude";
			public static final String FIELD_LONGITUDE  = "longitude";	
			public static final String FIELD_SPEED		= "speed";
			public static final String FIELD_DATE		= "date";
			
			public static final String TABLE_NAME = "ranking";
		}		
		
		public static interface PARAMETER {
			public static final String FIELD_ID	 		= "xidParameter";
			public static final String FIELD_NAME 		= "name";
			public static final String FIELD_VALUE 		= "value";
			public static final String FIELD_DESCRIPTION= "description";
			public static final String FIELD_CREATE_DATE= "dateCreated";
			
			public static final String TABLE_NAME = "parameter";
		}

		public static interface SYNCDATA {
			public final static String FIELD_ID = "xidSyncData";
			public final static String FIELD_NAME = "name";
			public final static String FIELD_LAST_TRY = "lastTryDateTime";
			public final static String FIELD_LAST_SUCCESS = "lastSuccessDateTime";
			
			public final static String TABLE_NAME = "syncData";
		}
	
	}
	
}
